/**
 * BrandBigData.com Inc.
 * Copyright (c) 2016 All Rights Reserved.
 */
package com.qibao.toolkit.facade;

import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * python脚本的执行上下文
 *
 * @author xumin
 * @version $Id:ExecuteContext.java, v0.1 2017/6/13 15:16 xumin
 */
public class ExecuteContext implements Serializable {
    private static final long serialVersionUID = -7975533000166566241L;

    //执行参数
    private Map<String, Object> parameters = new HashMap<>();

    public Map<String, Object> getParameters() {
        return Collections.unmodifiableMap(parameters);
    }

    public void addParameter(String name, Object value) {
        parameters.put(name, value);
    }

    public Object getParameter(String name) {
        return parameters.get(name);
    }

    public void addParameters(Map<String, ?> parameters) {
        this.parameters.putAll(parameters);
    }

}
